package com.fengye.school.json;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fengye.school.model.school.enums.SexType;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class SexTypeJsonSerializer extends JsonSerializer<SexType> {
    @Override
    public void serialize(SexType sexType, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        jsonGenerator.writeString(sexType.getName());
    }
}